package com.pdsu.xpf.graduation01.service.impl;

import com.pdsu.xpf.graduation01.dao.ICommodityTypeDao;
import com.pdsu.xpf.graduation01.domain.CommodityType;
import com.pdsu.xpf.graduation01.domain.Type;
import com.pdsu.xpf.graduation01.service.ICommodityTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommodityTypeServiceImpl implements ICommodityTypeService {

    final
    ICommodityTypeDao iCommodityTypeDao;

    public CommodityTypeServiceImpl(ICommodityTypeDao iCommodityTypeDao) {
        this.iCommodityTypeDao = iCommodityTypeDao;
    }

    @Override
    public List<Type> getTypeList() {
        return iCommodityTypeDao.getTypeList();
    }

    @Override
    public List<CommodityType> getCommodityListByTID(int tid) {
        return iCommodityTypeDao.getCommodityListByTID(tid);
    }
}
